package main

import "fmt"

//声明变量
// var name string
// var age int
// var isOk bool
//批量
var (
	name1 string
	age1  int
	isOk1 bool
	aaa   = 3 //类型推导 根据值判断该变量类型
	aaaa  = 4
)

func variable() {
	var a int
	var s string
	fmt.Printf("a = %d, s = %s\n", a, s)
}

//iota
const (
	a = iota
	b
	c
)
const (
	a1, a2 = iota + 1, iota + 2 //1 2
	b1, b2 = iota + 1, iota + 2 //2 3
	c1, c2 = iota + 1, iota + 2 //3 4
)

func variableInitValue() {
	var a int = 3
	var s string = "abc"
	fmt.Printf("a = %d, s = %s\n", a, s)
}

func main() {
	fmt.Println("Hello, World!")
	variable()
	variableInitValue()
	fmt.Print(aaaa)
	fmt.Println(a, b, c)
	fmt.Println(a1, a2, b1, b2, c1, c2)
}
